const Router = require('@koa/router');

const env = require('../env');
const utils = require('../utils');

const router = new Router({ prefix: '/auth' })

/** web 登出 */
router.post('/logout', async function(ctx) {
  ctx.cookies.set(env.JWT.name, null)
  ctx.body = utils.genResponse(true)
})

module.exports = router